<?php

namespace app\common\model;

use think\Cache;
use think\Model;

/**
 * 记录
 */
class UserHistory extends Model
{
    protected $table = 'fa_user_history';
    
    // 开启自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';
    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';

    /**
     * 添加充值记录
     *
     * @param [type] $user_id
     * @param [type] $type
     * @param [type] $nums
     * @param [type] $remark
     * @return void
     */
    public static function addLog($user_id,$type,$nums,$remark,$taobaoorder){

        $data = [];
        $data['user_id'] = $user_id;
        $data['type']    = $type;
        $data['nums']    = $nums;
        $data['remark']  = $remark;
        $data['taobaoorder']  = $taobaoorder;
        self::create($data);
    }
}
